﻿@using WineStore.Extends;
@model WineStore.Models.Product
@{
    ViewBag.Title = "DeleteProduct";
    Layout = "~/Views/Shared/AdminLayout.cshtml";
}
<!-- Table (TABLE) -->
@if (Session["Admin"] != null)
{
    <h3 class="tit">Delete Product
    </h3>
    <fieldset>
        <legend>Delete Product</legend>
        @using (Html.BeginForm("DeleteProduct", "Product", FormMethod.Post, new { enctype = "multipart/form-data" }))
        { 
            @Html.HiddenFor(model => model.ProductId)
            <table class="nostyle">
                <tbody>
                    <tr>
                        <td>Category Name:
                        </td>
                        <td>
                            @ViewBag.CategoryName
                        </td>
                    </tr>
                    <tr>
                        <td>Product Name (English):
                        </td>
                        <td>
                            @Html.DisplayFor(model => model.ProductName_EN)
                        </td>
                    </tr>
                    <tr>
                        <td>Product Name (German):
                        </td>
                        <td>
                            @Html.DisplayFor(model => model.ProductName_GER)
                        </td>
                    </tr>
                    <tr>
                        <td>Product Price:
                        </td>
                        <td>
                            @Html.DisplayFor(model => model.ProductPrice)
                        </td>
                    </tr>

                    <tr>
                        <td style="vertical-align: middle;">Image:
                        </td>
                        <td>
                            @Html.ImageFor(model => "../../Content/Images/Products/" + model.ProductImage, new { width = "200px", height = "200px", alt = "some alt text" })
                        </td>
                        <td style="color: Red;"></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <input type="submit" value="Delete Product" class="submit"/>
                        </td>
                    </tr>
                </tbody>
            </table>
        }
    </fieldset>
}
else
{
    Response.Redirect("~/Admin/LogOn/");
}